package thread.synchronizedtest;
/**
 * 不同的实例对象可以同时执行
 * */
public class MainTest2 {
    public static void main(String[] args){

        ObjectService service=new ObjectService();

        ObjectService service1 = new ObjectService();
        ThreadA a=new ThreadA(service);
        a.setName("a");
        a.start();
        ThreadB b=new ThreadB(service1);
        b.setName("b");
        b.start();
    }


}
